
// cached javascript
var AjaxMethod = {
GetUsersByOrg:function(orgId,callback,context){return new ajax_request(this.url + '?_method=GetUsersByOrg&_session=no','orgId=' + enc(orgId),callback, context);},
GetZonesByBlockId:function(blockId,callback,context){return new ajax_request(this.url + '?_method=GetZonesByBlockId&_session=r','blockId=' + enc(blockId),callback, context);},
GetEstateByBlockId:function(blockId,callback,context){return new ajax_request(this.url + '?_method=GetEstateByBlockId&_session=r','blockId=' + enc(blockId),callback, context);},
GetEstateByZoneId:function(zoneId,callback,context){return new ajax_request(this.url + '?_method=GetEstateByZoneId&_session=no','zoneId=' + enc(zoneId),callback, context);},
GetBuildsByEstateId:function(estateId,callback,context){return new ajax_request(this.url + '?_method=GetBuildsByEstateId&_session=no','estateId=' + enc(estateId),callback, context);},
SetHouseFav:function(houseId,callback,context){return new ajax_request(this.url + '?_method=SetHouseFav&_session=r','houseId=' + enc(houseId),callback, context);},
SetClientFav:function(clientId,callback,context){return new ajax_request(this.url + '?_method=SetClientFav&_session=r','clientId=' + enc(clientId),callback, context);},
UrlEncode:function(param,callback,context){return new ajax_request(this.url + '?_method=UrlEncode&_session=no','param=' + enc(param),callback, context);},
DeleteObj:function(objIds,objType,callback,context){return new ajax_request(this.url + '?_method=DeleteObj&_session=r','objIds=' + enc(objIds)+ '\r\nobjType=' + enc(objType),callback, context);},
DeleteLogObj:function(objId,objType,callback,context){return new ajax_request(this.url + '?_method=DeleteLogObj&_session=r','objId=' + enc(objId)+ '\r\nobjType=' + enc(objType),callback, context);},
DeleteLogObj1:function(objId,objType,objtyp,callback,context){return new ajax_request(this.url + '?_method=DeleteLogObj1&_session=r','objId=' + enc(objId)+ '\r\nobjType=' + enc(objType)+ '\r\nobjtyp=' + enc(objtyp),callback, context);},
DeleteObjLogical:function(objId,objType,callback,context){return new ajax_request(this.url + '?_method=DeleteObjLogical&_session=r','objId=' + enc(objId)+ '\r\nobjType=' + enc(objType),callback, context);},
RestoreObj:function(objIds,objType,callback,context){return new ajax_request(this.url + '?_method=RestoreObj&_session=no','objIds=' + enc(objIds)+ '\r\nobjType=' + enc(objType),callback, context);},
DelAllObj:function(objType,callback,context){return new ajax_request(this.url + '?_method=DelAllObj&_session=no','objType=' + enc(objType),callback, context);},
DeleteSysEstateById:function(objId,objType,callback,context){return new ajax_request(this.url + '?_method=DeleteSysEstateById&_session=no','objId=' + enc(objId)+ '\r\nobjType=' + enc(objType),callback, context);},
DelHouse:function(houseid,callback,context){return new ajax_request(this.url + '?_method=DelHouse&_session=r','houseid=' + enc(houseid),callback, context);},
DelClient:function(clientid,callback,context){return new ajax_request(this.url + '?_method=DelClient&_session=r','clientid=' + enc(clientid),callback, context);},
DelContract:function(contractid,callback,context){return new ajax_request(this.url + '?_method=DelContract&_session=r','contractid=' + enc(contractid),callback, context);},
Delweixin:function(wxid,callback,context){return new ajax_request(this.url + '?_method=Delweixin&_session=no','wxid=' + enc(wxid),callback, context);},
HasChildOrgOrUser:function(orgid,callback,context){return new ajax_request(this.url + '?_method=HasChildOrgOrUser&_session=no','orgid=' + enc(orgid),callback, context);},
IsAccontkindUsed:function(akid,callback,context){return new ajax_request(this.url + '?_method=IsAccontkindUsed&_session=no','akid=' + enc(akid),callback, context);},
UpdateAccontkind:function(akid,callback,context){return new ajax_request(this.url + '?_method=UpdateAccontkind&_session=no','akid=' + enc(akid),callback, context);},
DeleteAccontkind:function(akid,callback,context){return new ajax_request(this.url + '?_method=DeleteAccontkind&_session=no','akid=' + enc(akid),callback, context);},
GetAccountKind:function(type,callback,context){return new ajax_request(this.url + '?_method=GetAccountKind&_session=no','type=' + enc(type),callback, context);},
OffWork:function(callback,context){return new ajax_request(this.url + '?_method=OffWork&_session=r','',callback, context);},
Logout:function(callback,context){return new ajax_request(this.url + '?_method=Logout&_session=r','',callback, context);},
ViewClientOwner:function(clientId,callback,context){return new ajax_request(this.url + '?_method=ViewClientOwner&_session=r','clientId=' + enc(clientId),callback, context);},
ViewHouseOwner:function(houseId,callback,context){return new ajax_request(this.url + '?_method=ViewHouseOwner&_session=r','houseId=' + enc(houseId),callback, context);},
outExcel:function(houseSelect,lblOrg,userID,callback,context){return new ajax_request(this.url + '?_method=outExcel&_session=r','houseSelect=' + enc(houseSelect)+ '\r\nlblOrg=' + enc(lblOrg)+ '\r\nuserID=' + enc(userID),callback, context);},
GetClientNameById:function(clientId,callback,context){return new ajax_request(this.url + '?_method=GetClientNameById&_session=no','clientId=' + enc(clientId),callback, context);},
GetHouseNameById:function(houseId,callback,context){return new ajax_request(this.url + '?_method=GetHouseNameById&_session=no','houseId=' + enc(houseId),callback, context);},
ValUserPwd:function(pwd,callback,context){return new ajax_request(this.url + '?_method=ValUserPwd&_session=r','pwd=' + enc(pwd),callback, context);},
SaveHouseRows:function(rows,callback,context){return new ajax_request(this.url + '?_method=SaveHouseRows&_session=r','rows=' + enc(rows),callback, context);},
SaveClientRows:function(rows,callback,context){return new ajax_request(this.url + '?_method=SaveClientRows&_session=r','rows=' + enc(rows),callback, context);},
SelectOrgs:function(names,ids,orgid,check,callback,context){return new ajax_request(this.url + '?_method=SelectOrgs&_session=r','names=' + enc(names)+ '\r\nids=' + enc(ids)+ '\r\norgid=' + enc(orgid)+ '\r\ncheck=' + enc(check),callback, context);},
HouseBackup:function(houseids,callback,context){return new ajax_request(this.url + '?_method=HouseBackup&_session=r','houseids=' + enc(houseids),callback, context);},
ValUsermobile:function(usermobile,isAgent,callback,context){return new ajax_request(this.url + '?_method=ValUsermobile&_session=no','usermobile=' + enc(usermobile)+ '\r\nisAgent=' + enc(isAgent),callback, context);},
ValKeystaff:function(keyid,callback,context){return new ajax_request(this.url + '?_method=ValKeystaff&_session=r','keyid=' + enc(keyid),callback, context);},
Valhousemobile:function(Housemobile,callback,context){return new ajax_request(this.url + '?_method=Valhousemobile&_session=r','Housemobile=' + enc(Housemobile),callback, context);},
Valhouscodemobile:function(Housemobile,callback,context){return new ajax_request(this.url + '?_method=Valhouscodemobile&_session=r','Housemobile=' + enc(Housemobile),callback, context);},
Valorgstate:function(orgid,callback,context){return new ajax_request(this.url + '?_method=Valorgstate&_session=r','orgid=' + enc(orgid),callback, context);},
IsEstateNameExist:function(name,callback,context){return new ajax_request(this.url + '?_method=IsEstateNameExist&_session=r','name=' + enc(name),callback, context);},
LockPage:function(callback,context){return new ajax_request(this.url + '?_method=LockPage&_session=r','',callback, context);},
UnLockPage:function(callback,context){return new ajax_request(this.url + '?_method=UnLockPage&_session=r','',callback, context);},
GetNewMessage:function(callback,context){return new ajax_request(this.url + '?_method=GetNewMessage&_session=r','',callback, context);},
MsgRemind:function(type,isbool,callback,context){return new ajax_request(this.url + '?_method=MsgRemind&_session=r','type=' + enc(type)+ '\r\nisbool=' + enc(isbool),callback, context);},
MsgScope:function(type,value,callback,context){return new ajax_request(this.url + '?_method=MsgScope&_session=r','type=' + enc(type)+ '\r\nvalue=' + enc(value),callback, context);},
CheckCommend:function(callback,context){return new ajax_request(this.url + '?_method=CheckCommend&_session=r','',callback, context);},
ValUserName:function(usertel,callback,context){return new ajax_request(this.url + '?_method=ValUserName&_session=no','usertel=' + enc(usertel),callback, context);},
ValSendCount:function(username,callback,context){return new ajax_request(this.url + '?_method=ValSendCount&_session=no','username=' + enc(username),callback, context);},
GetMenus:function(callback,context){return new ajax_request(this.url + '?_method=GetMenus&_session=r','',callback, context);},
GetMenus1:function(callback,context){return new ajax_request(this.url + '?_method=GetMenus1&_session=r','',callback, context);},
ValSendCode:function(username,code,callback,context){return new ajax_request(this.url + '?_method=ValSendCode&_session=no','username=' + enc(username)+ '\r\ncode=' + enc(code),callback, context);},
AddContractConfig:function(cutFrom,cutTo,pro,preId,callback,context){return new ajax_request(this.url + '?_method=AddContractConfig&_session=r','cutFrom=' + enc(cutFrom)+ '\r\ncutTo=' + enc(cutTo)+ '\r\npro=' + enc(pro)+ '\r\npreId=' + enc(preId),callback, context);},
DelContractConfig:function(Id,callback,context){return new ajax_request(this.url + '?_method=DelContractConfig&_session=no','Id=' + enc(Id),callback, context);},
TransHouse:function(id,uid,callback,context){return new ajax_request(this.url + '?_method=TransHouse&_session=r','id=' + enc(id)+ '\r\nuid=' + enc(uid),callback, context);},
delTransHouse:function(id,callback,context){return new ajax_request(this.url + '?_method=delTransHouse&_session=no','id=' + enc(id),callback, context);},
givenHouseData:function(house_ids,uid,callback,context){return new ajax_request(this.url + '?_method=givenHouseData&_session=no','house_ids=' + enc(house_ids)+ '\r\nuid=' + enc(uid),callback, context);},
getHousePhotoByHouseId:function(id,callback,context){return new ajax_request(this.url + '?_method=getHousePhotoByHouseId&_session=no','id=' + enc(id),callback, context);},
delHousePhoto:function(ids,callback,context){return new ajax_request(this.url + '?_method=delHousePhoto&_session=no','ids=' + enc(ids),callback, context);},
ContractByLadder:function(hcAll,callback,context){return new ajax_request(this.url + '?_method=ContractByLadder&_session=r','hcAll=' + enc(hcAll),callback, context);},
UpdateAgentStoreInfo:function(name,linkman,mobile,remark,callback,context){return new ajax_request(this.url + '?_method=UpdateAgentStoreInfo&_session=r','name=' + enc(name)+ '\r\nlinkman=' + enc(linkman)+ '\r\nmobile=' + enc(mobile)+ '\r\nremark=' + enc(remark),callback, context);},
GetHouseStateById:function(houseId,callback,context){return new ajax_request(this.url + '?_method=GetHouseStateById&_session=no','houseId=' + enc(houseId),callback, context);},
GetClientStateById:function(clientId,callback,context){return new ajax_request(this.url + '?_method=GetClientStateById&_session=no','clientId=' + enc(clientId),callback, context);},
GetMateImageUrl:function(media_id,callback,context){return new ajax_request(this.url + '?_method=GetMateImageUrl&_session=r','media_id=' + enc(media_id),callback, context);},
GetMenus2:function(callback,context){return new ajax_request(this.url + '?_method=GetMenus2&_session=r','',callback, context);},
TrustGetTypeBtId:function(trustId,callback,context){return new ajax_request(this.url + '?_method=TrustGetTypeBtId&_session=no','trustId=' + enc(trustId),callback, context);},
GetMenusNew:function(callback,context){return new ajax_request(this.url + '?_method=GetMenusNew&_session=r','',callback, context);},
url:'/house/ajax/YFH.BLL.AjaxMethod,YFH.BLL.ashx'
}
function HtmlControl(id) {
	var ele = null;
	if(typeof(id) == 'object') ele = id; else ele = document.getElementById(id);
	if(ele == null) return null;
	var _o = ele.cloneNode(true);
	var _op = document.createElement('SPAN');
	_op.appendChild(_o);	
	this._source = _op.innerHTML;
}
HtmlControl.prototype.toString = function(){ return this._source; }

function HtmlControlUpdate(func, parentId) {
var f,i,ff,fa='';
var ele = document.getElementById(parentId);
if(ele == null) return;
var args = [];
for(i=0; i<HtmlControlUpdate.arguments.length; i++)
	args[args.length] = HtmlControlUpdate.arguments[i];
if(args.length > 2)
	for(i=2; i<args.length; i++){fa += 'args[' + i + ']';if(i < args.length -1){ fa += ','; }}
f = '{"invoke":function(args){return ' + func + '(' + fa + ');}}';
ff = null;eval('ff=' + f + ';');
if(ff != null && typeof(ff.invoke) == 'function')
{
	var res = ff.invoke(args);
	if(res.error != null){alert(res.error);return;}
	ele.innerHTML = res.value;
}
}
function TimeSpan(){this.Days=0;this.Hours=0;this.Minutes=0;this.Seconds=0;this.Milliseconds=0;}
TimeSpan.prototype.toString = function(){return this.Days+'.'+this.Hours+':'+this.Minutes+':'+this.Seconds+'.'+this.Milliseconds;}
function _getTable(n,e){for(var i=0; i<e.Tables.length; i++){if(e.Tables[i].Name == n)return e.Tables[i];}return null;}
function AjaxImage(url){var img=new Image();img.src=url;return img;}
function digi(v, c){v = v + "";var n = "0000";if(v.length < c) return n.substr(0, c-v.length) + v;return v;}
function DateTime(year,month,day,hours,minutes,seconds){if(year>9999||year<1970||month<1||month>12||day<0||day>31||hours<0||hours>23||minutes<0||minutes>59||seconds<0||seconds>59)throw("ArgumentException");this.Year = year;this.Month = month;this.Day = day;this.Hours = hours;this.Minutes = minutes;this.Seconds = seconds;}
DateTime.prototype.toString = function(){return digi(this.Year,4) + digi(this.Month,2) + digi(this.Day,2) + digi(this.Hours,2) + digi(this.Minutes,2) + digi(this.Seconds,2);}
